//
//  IapMarco.h
//  iap_pay
//
//  Created by 胡锦涛 on 2020/1/19.
//

#import <Foundation/Foundation.h>


NS_ASSUME_NONNULL_BEGIN
#pragma mark - iOS空数组/对象处理
/** 字符串是否为空 */
#define HK_StringIsEmpty(str) ([str isKindOfClass:[NSNull class]] || str == nil || [str length] < 1 ? YES : NO )
/** 数组是否为空 */
#define HK_ArrayIsEmpty(array) (array == nil || [array isKindOfClass:[NSNull class]] || array.count == 0)
/** 字典是否为空 */
#define HK_DictIsEmpty(dic) (dic == nil || [dic isKindOfClass:[NSNull class]] || dic.allKeys == 0)
/** 是否是空对象 */
#define HKStringNull  @"(null)"
#define HKNullobj   ([NSNull null])
#define HK_ObjectIsEmpty(_object) (_object == nil \
|| [_object isKindOfClass:[NSNull class]] \
|| ([_object isEqual:@"(null)"]) \
|| (_object == NULL) \
|| ([(_object) isEqual:(HKStringNull)]) \
|| ([_object respondsToSelector:@selector(length)] && [(NSData *)_object length] == 0) \
|| ([_object respondsToSelector:@selector(count)] && [(NSArray *)_object count] == 0))


@interface IapMarco : NSObject

@end

NS_ASSUME_NONNULL_END
